/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Codigo;

/**
 *
 * @author Kyerte
 */
public class ValidaNumeros {

    public static boolean validarNumeroEntero(String str) {

        try {

            Integer.parseInt(str);

        } catch (NumberFormatException ex) {

            return false;
        }

        return true;
    }

    public static boolean validarNumeroFlotante(String str) {

        try {

            Float.parseFloat(str);

        } catch (NumberFormatException ex) {

            return false;
        }

        return true;
    }

    public static boolean validarNumeroDoble(String str) {

        try {

            Double.parseDouble(str);

        } catch (NumberFormatException ex) {

            return false;
        }

        return true;
    }
}
